package com.ruoyi.project.purchase.service.impl;

import com.ruoyi.project.purchase.domain.Factoriess;
import com.ruoyi.project.purchase.domain.P_drug;
import com.ruoyi.project.purchase.domain.PurDrugFac;
import com.ruoyi.project.purchase.mapper.P_DrugMapper;
import com.ruoyi.project.purchase.mapper.FactoriessMapper;
import com.ruoyi.project.purchase.service.FactoriessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class FactoriessServiceImpl implements FactoriessService {
    @Autowired
    private FactoriessMapper factoriessMapper;
    @Autowired
    private P_DrugMapper p_drugMapper;
    @Override
    public List<Factoriess> getAllFactorysType() {
        return factoriessMapper.getAllFactorysType();
    }

    @Override
    public List<P_drug> getAllDrugs(P_drug p_drug) {
        return p_drugMapper.findAll(p_drug);
    }

    @Override
    public List<PurDrugFac> findAllPurDrugFac( P_drug p_drug) {
        return p_drugMapper.findAllPurDrugFac(p_drug);
    }
}
